home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / PROTENG.ARJ / PROTENG.DOC < prev    next >
Text File  |  1992-07-16  |  10KB  |  252 lines

  1.  
  2.  
  3.       Copyright 1992 Mark Dignam and Mick Howland - Omen Computer Services
  4.           Perth Omen Bullietin Board System - 3:690/660@fidonet
  5.  
  6.  
  7.  
  8.                   The Protocol Engine (Very First Beta copy!)
  9.  
  10.      The EASY way to get your Turbo Pascal programs to transfer files!
  11.  
  12.  
  13. The legal stuff first:
  14.  
  15. This is MY program - i spent many long hours writing it and testing it. All
  16. parts of it, including the source code, the compiled TPU's and the documents
  17. will remain copywrite. You, the end user, are granted a license to use the
  18. software provided in any manner you see fit, provided you DO NOT allow the
  19. source code to be given or copied to any other user in any form. You paid for
  20. the source code - I wrote it - why should somebody else profit from your MONEY
  21. and my work?
  22.  
  23. Any executable programs that are created or compiled using either sections or
  24. all of The Protocol Engine are yours, the end user, to do with as you wish. I
  25. do not wish a royalty payment for any of your executables, but a note to the
  26. effect that the Protocol Engine was used in a product would be nice.
  27.  
  28.  
  29. More Legal Stuff!
  30.  
  31. The following names are trademarks and/or registered names:
  32.  
  33. Turbo Pascal                             Borland International.
  34.  
  35. Thanks for the code and/or designs:
  36.  
  37. Micheal Quinlan                          Async4 Pascal Unit
  38. Mark G. Mendel                           Crc16 Tables and UpdCrc
  39. Stephen Satchell - Satchell Evalutions   Crc32 Design
  40. Chuck Forsberg   - Omen Technology       The Ymodem and Zmodem Protocols
  41. Gary S. Brown                            Crc32 tables
  42. System Enhancement Assocaties            The Sealink Protocol
  43. Ward Christensen                         The Xmodem (original!) Protocol
  44.  
  45.  
  46. Now for the real stuff.
  47.  
  48. This is only a prelim document that I threw together - if any of the Beta
  49. testers out there want to do a better job - please do so! I might be able to
  50. write code - but english is a shit. So even the docs are Beta Versions!
  51.  
  52. Contents of this Archive.
  53.  
  54. The first two Files are support source code for the Protocol Engine, but you
  55. can do with what you like. The Ansi unit I wrote a long time ago for another
  56. project, it may or may not have bugs - it works for me! The Comms unit is a
  57. very modified version of ASYNC4 with Fossil Support and internal 16650 support.
  58.  
  59. ansi_drv.pas    Source Code for a Ansi Screen Unit
  60. comm.pas        A Half Decent Comms Unit.
  61.  
  62. This is a demo program showing you how to use the Protocol Engine. It has all
  63. of the transfer protocols in it, along with Ansi and Doorway mode.
  64.  
  65. term.pas
  66. term.exe
  67.  
  68. Now for the real meat of the archive. The next three files are the Turbo
  69. Pascal units. The numbers in the extenstion field are the version of TP they
  70. are for. To use it - just copy the version you use to Proteng.tpu!
  71.  
  72. proteng.50
  73. proteng.55
  74. proteng.60
  75.  
  76. proteng.doc     This Document!
  77.  
  78.  
  79.  
  80. What is a Protocol Engine?
  81.  
  82. It is a set of software routines that take all the hard work out of writing
  83. communication software.  What we have done is put together in one easy_to_use
  84. TurboPascal (versions 5,5.5 and 6) Unit ALL the procedures and functions
  85. required to transfer files from computer to computer, using various methods of
  86. error checking, by a serial port.
  87.  
  88.  
  89. This unit has been to designed from the ground up to fufill two requirments:
  90.  
  91. 1) It must be very easy to use - for even the novice programmer experimenting
  92. with say writing a door program etc. This has been achived by using a small
  93. array of strings to transfer the filenames between the main program and the
  94. unit - and then calling a simple Boolean function for each different method.
  95.  
  96. 2) It must have a low DataSegment overhead - yet still offer decent size TX/RX
  97. buffer sizes, suitable for Binkley/FrontDoor transfers and high speed modem
  98. links. The current DataSegment use is less than 5k - while still having up to
  99. 15k disk buffering usable.
  100.  
  101. As a added incentive, since the Protocol Engine requires a Async unit to
  102. handle high speed communications, a Comm unit is included with full source
  103. code. This unit, which is a modified version of the Public Domain ASYNC4,
  104. handles both Fossil and Non_Fossil evironments with ease at speeds upto 38400
  105. baud.
  106.  
  107.  
  108. Here is a dump of the header for the Protocol Engine.
  109.  
  110.  
  111. Unit ProtEng;
  112.  
  113. INTERFACE
  114.  
  115. uses crt, dos,Comm;
  116.  
  117. Type
  118.    Str64    = String[64];
  119.  
  120.  
  121. { This allows you to use the same string size as used by the Filename array  }
  122.  
  123.  
  124. Const
  125.    MaxZBlockSize : Word = 1024;
  126.    MaxRetrys     : Byte = 10;
  127.  
  128. { MaxZBlockSize is the size of the maximum data block that can be sent using }
  129. { Zmodem. For most terminal packages - this must be left at 1k! However most }
  130. { mailers such as Binkley can handle a 8k Zmodem data block.                 }
  131.  
  132. { MaxRetrys is the point at which the Protocol Engine will errorout          }
  133.  
  134.  
  135. Var
  136.     Thenames        : Array[1..30] of str64;
  137.     NumberOfFiles   : Byte;
  138.     OverWrite       : Boolean;
  139.  
  140. { Thenames is the Array of string which in
  141. { 1) Transmit modes contain the names of the files you wish to send to the   }
  142. {    remote computer.                                                        }
  143. { 2) When reciveing files - if the mode is a single file mode - the FIRST    }
  144. {    entry must contain the filename including FULL path, otherwise when in  }
  145. {    batch mode - the first entry must contain the full upload path to place }
  146. {    the files. Upon return - the array will be filled with the names of the }
  147. {    files that have been recieved.                                          }
  148.  
  149. { NumberOfFiles:                                                             }
  150. { 1) In transmit modes - this contains the number of entrys in the filename  }
  151. {    array you wish to send.                                                 }
  152. {                                                                            }
  153. { 2) In recieve modes - this will return with the number of files that were  }
  154. {    recieved, and this many names will be in the filename array.            }
  155.  
  156. { OverWrite:                                                                 }
  157. {    This is a Boolean flag used in recieving to allow either Overwriting of }
  158. {    existing files, or when using Zmodem, allows CrashRecovery. If this     }
  159. {    flag is left to its default of False - the file will be renamed if it   }
  160. {    exists in the directory already.                                        }
  161.  
  162.  
  163. Function Xmodemrx       : Boolean;        {Done!}   {Has Auto 1k checking}
  164. Function XmodemTX       : Boolean;        {Done!}
  165. Function Xmodem1kTX     : Boolean;        {Done!}
  166. Function YmodemTX       : Boolean;        {Done!}   {Has Auto Gmode Checking}
  167. Function YmodemRx       : Boolean;        {Done!}
  168. Function YmodemGRX      : Boolean;        {Done!}
  169. Function ZmodemTX       : Boolean;        {Done!}
  170. Function ZmodemRX       : Boolean;        {Done!}
  171. Function YappRX         : Boolean;        {Done!}
  172. Function YappTx         : Boolean;        {Done!}
  173.  
  174. (*
  175. Function SealinkTx      : Boolean;        { not quite finished yet!}
  176. Function SealinkRx      : Boolean;
  177. *)
  178.  
  179.  
  180. The beta release of the Protocol Engine will be available from The Perth Omen
  181. BBS. This is a Turbo Pascal unit (versions 5, 5.5 and 6) that transfers files
  182. for you!
  183.  
  184. It has support for Xmodem, Xmodem 1k Blocks, Ymodem Batch, Ymodem-G Batch,
  185. Zmodem (both Crc16 and CRC32) and Yapp (a packet radio protocol).
  186.  
  187. The Zmodem mode supports full crash recovery in both send and receive modes,
  188. the batch modes have a limit (easily changed) of 30 files in a transfer, but
  189. overwrite or create a new file when receiving is also there. The unit has its
  190. own comms driver good upto 38kbs built-in, but will use a Fossil if fitted.
  191.  
  192. The Sealink protocol (with full Overdrive and Recovery built in) will be going
  193. in the release version - but not in the beta.
  194.  
  195. The release version will be available in three flavours:
  196.  
  197. 1) the compiled TPU's with sample Term program with source for the term
  198.    program, the Comms unit and the Ansi unit included - but NO source for the
  199.    TPU's. It will also have an "annoying" copywrite message hard coded into
  200.    the TPU's. This is the shareware demo version that will allowed on BBS's.
  201.  
  202. 2) As above - but without the annoying message. This will cost $20A for
  203.    registation (plus $5 postage if needed) and will be a full legal copy with
  204.    BBS support.
  205.  
  206. 3) The FULL source code to everything. This has over 150k of pascal source for
  207.    the entire Protocol engine with NO royalties attached. This will cost $100A
  208.    (plus $5 postage where needed) and BBS support will be given though the
  209.    Perth Omen BBS.
  210.  
  211.  
  212. Known Features (ok.. Bugs!)
  213.  
  214. 1) The Protocol Engine is very nasty about filenames and/or paths which are
  215.    sent to it for transfer and don't exist. This is up to YOU to make sure that the
  216.    both paths for uploads and the names for download do REALLY exist. This
  217.    includes the download dir which MUST have a trailing "\"!   When sending,
  218.    it will bypass a file that doesn't exist with a IoResult - but the results
  219.    afterwards could be interesting to watch. However in the same breath, if a
  220.    file is uploaded with a pathname in the filename header - the path is
  221.    stripped - and your's put in its place.
  222.  
  223. 2) Sealink isn't done yet. Please read further on as to future directions.
  224.  
  225.  
  226.  
  227. Future Directions.
  228.  
  229. 1) I plan to have the Sealink (with OverDrive and Crash Recovery) in as soon
  230.    as possible. But work commiments don't allow me to do this - I hope to have
  231.    it done by the time i have a public release ready.
  232.  
  233. 2) Improvments to the Yapp Packet radio protocol - To come into line with what
  234.    Tony (from Paket5 fame) has done with Paket for crash recovery.
  235.  
  236. 3) A hook into the transfer section so you get a) check for dupe name b) Get a
  237.    log entry as soon as the file is transfered - not at the end of the batch.
  238.  
  239.  
  240.  
  241.  
  242.  
  243. Any feedback - please do so via netmail or direct connection to the Perth Omen
  244. BBS +61 (9) 244-2111 (V32 - 3 Lines).
  245.  
  246. Mark Dignam and Mick Howland - Sysops.
  247.  
  248.  
  249.  
  250. p.s. Have fun!
  251.  
  252.